#include "XLog.h"
#include <iostream>

XLog* XLog::ptr_xlog = NULL;
XLog::XLog()
{
	ptr_xlog = this;
}


XLog::~XLog()
{
}


void XLog::LogTo(UINT u_type, string str_content){
	if (u_type == 0){
		if (strm_log_file.is_open()){
			strm_log_file << str_content;
		}
	}
	else if (u_type == 1){
		 std::cout<< str_content << endl;
	}
}
void XLog::SetLogFile(string str_file_name){
	if (strm_log_file.is_open())
		strm_log_file.close();
	strm_log_file.open(str_file_name, ios::out);
}
